package com.boang.controller;

import com.boang.feign.OrderFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/*
  @author: 13813
  @date: 2024/8/30 11:28
*/
@RestController
public class SpuController {

    @Value("${server.port}")
    private String serverPort;

    @Autowired
    private OrderFeign orderFeign;

    @RequestMapping("/getSpu/{sid}")
    public String getSpu(@PathVariable("sid") String sid) {
        return "商品系统：" + serverPort + "|订单系统：" + orderFeign.getOrder(sid);
    }
}
